package com.yuwei.goods_detail.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yuwei.goods_detail.R
import com.yuwei.goods_detail.entity.CommentEntity

class CommentAdapter:BaseQuickAdapter<CommentEntity,BaseViewHolder>(R.layout.item_comment) {
    override fun convert(holder: BaseViewHolder, item: CommentEntity) {
        val commitUserIv = holder.getView<ImageView>(R.id.comment_user_iv)
        Glide.with(context).load(item.image).circleCrop().into(commitUserIv)
        holder.setText(R.id.comment_user_name,item.name)
        holder.setText(R.id.comment_user_content,item.content)
    }
}